package com.home.oss.entity;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.time.LocalDateTime;


/**
 * Description: 文件信息表
 * Created by 王大宸 on 2020-10-15 21:29:33
 * Created with IntelliJ IDEA.
 */
@Table(name = "base_biz_file")
public class OssBizFile implements Serializable{
private static final long serialVersionUID=1L;

    @Id
    private String id;


    /**
     * 文件MD5
     */
    @Column(name = "biz_md5")
    private String bizMd5;


    /**
     * 网络路径
     */
    @Column(name = "real_path")
    private String realPath;


    /**
     * 文件存放路径
     */
    @Column(name = "url")
    private String url;


    /**
     * 文件名称
     */
    @Column(name = "file_name")
    private String fileName;


    /**
     * 文件大小
     */
    @Column(name = "file_size")
    private Long fileSize;


    /**
     * 文件格式
     */
    @Column(name = "file_format")
    private String fileFormat;


    /**
     * 文件类型
     */
    @Column(name = "biz_type")
    private String bizType;


    /**
     * 下载量
     */
    @Column(name = "download_count")
    private Integer downloadCount;


    /**
     * 创建时间
     */
    @Column(name = "create_time")
    private LocalDateTime createTime;


    /**
     * 创建人id
     */
    @Column(name = "create_user_id")
    private String createUserId;


    /**
     * 创建人姓名
     */
    @Column(name = "create_user")
    private String createUser;


    /**
     * 更新时间
     */
    @Column(name = "update_time")
    private LocalDateTime updateTime;


    /**
     * 更新人id
     */
    @Column(name = "update_user_id")
    private String updateUserId;


    /**
     * 更新人姓名
     */
    @Column(name = "update_user")
    private String updateUser;


    /**
     * 租户id
     */
    @Column(name = "tenant_id")
    private String tenantId;



    public void setId(String id) {
        this.id = id;
        }

    public String getId() {
        return id;
        }
    public void setBizMd5(String bizMd5) {
        this.bizMd5 = bizMd5;
        }

    public String getBizMd5() {
        return bizMd5;
        }
    public void setRealPath(String realPath) {
        this.realPath = realPath;
        }

    public String getRealPath() {
        return realPath;
        }
    public void setUrl(String url) {
        this.url = url;
        }

    public String getUrl() {
        return url;
        }
    public void setFileName(String fileName) {
        this.fileName = fileName;
        }

    public String getFileName() {
        return fileName;
        }
    public void setFileSize(Long fileSize) {
        this.fileSize = fileSize;
        }

    public Long getFileSize() {
        return fileSize;
        }
    public void setFileFormat(String fileFormat) {
        this.fileFormat = fileFormat;
        }

    public String getFileFormat() {
        return fileFormat;
        }
    public void setBizType(String bizType) {
        this.bizType = bizType;
        }

    public String getBizType() {
        return bizType;
        }
    public void setDownloadCount(Integer downloadCount) {
        this.downloadCount = downloadCount;
        }

    public Integer getDownloadCount() {
        return downloadCount;
        }
    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
        }

    public LocalDateTime getCreateTime() {
        return createTime;
        }
    public void setCreateUserId(String createUserId) {
        this.createUserId = createUserId;
        }

    public String getCreateUserId() {
        return createUserId;
        }
    public void setCreateUser(String createUser) {
        this.createUser = createUser;
        }

    public String getCreateUser() {
        return createUser;
        }
    public void setUpdateTime(LocalDateTime updateTime) {
        this.updateTime = updateTime;
        }

    public LocalDateTime getUpdateTime() {
        return updateTime;
        }
    public void setUpdateUserId(String updateUserId) {
        this.updateUserId = updateUserId;
        }

    public String getUpdateUserId() {
        return updateUserId;
        }
    public void setUpdateUser(String updateUser) {
        this.updateUser = updateUser;
        }

    public String getUpdateUser() {
        return updateUser;
        }
    public void setTenantId(String tenantId) {
        this.tenantId = tenantId;
        }

    public String getTenantId() {
        return tenantId;
        }

    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("bizMd5", getBizMd5())
                .append("realPath", getRealPath())
                .append("url", getUrl())
                .append("fileName", getFileName())
                .append("fileSize", getFileSize())
                .append("fileFormat", getFileFormat())
                .append("bizType", getBizType())
                .append("downloadCount", getDownloadCount())
                .append("createTime", getCreateTime())
                .append("createUserId", getCreateUserId())
                .append("createUser", getCreateUser())
                .append("updateTime", getUpdateTime())
                .append("updateUserId", getUpdateUserId())
                .append("updateUser", getUpdateUser())
                .append("tenantId", getTenantId())
            .toString();
    }

}
